
import java.sql.SQLException;

import controllers.DBController;
import controllers.SubscriberUIP;
import messagesPacks.SubscriberUpdateProfileMessage;
import messagesPacks.ViewHistoryMessage;
import fit.ActionFixture;
import gui.SubscriberUI;


public class ViewHistory  extends ActionFixture 

{
	 DBController dbc = null;
	 ViewHistoryMessage vh = null;
	 
	 
	 public ViewHistory()
	 {
		 try 
		 {
			 dbc = new DBController("localhost", 3306, "root","Braude","obl");
		 } 
		 catch (InstantiationException e) 
		 {
			 e.printStackTrace();
		 } 
		 catch (IllegalAccessException e) 
		 {
			 e.printStackTrace();
		 }
		 catch (ClassNotFoundException e) 
		 {
			 e.printStackTrace();
		 } 
		 catch (SQLException e) 
		 {
			 e.printStackTrace();
		 }
	
		 vh = new ViewHistoryMessage();
	 }
	 
	public void enterID(String userID)
	{
		vh.setUserID(userID);
	}
	 
	public void view_history()
	{
		dbc.SubViewHistory(null, vh);
		
	}
 
	public int History()
	{
		return vh.getMsg_result();
		

	}

	

}


